package com.example.springcloud.domain;

import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 新闻资讯对象 news
 * 
 * @author helian
 * @date 2025-03-01
 */

@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "新闻资讯对象")
@Data
public class News implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 新闻ID */
    @ApiModelProperty(value = "新闻ID")
    private Long id;

    /** 新闻标题 */
    @Excel(name = "新闻标题")
    @ApiModelProperty(value = "新闻标题")
    private String title;

    /** 新闻内容 */
    @Excel(name = "新闻内容")
    @ApiModelProperty(value = "新闻内容")
    private String content;

    /** 新闻图片地址 */
    @Excel(name = "新闻图片地址")
    @ApiModelProperty(value = "新闻图片地址")
    private String imgs;

    /** 发布时间（格式：YYYY-MM-DD HH:MM:SS） */
    @Excel(name = "发布时间", readConverterExp = "格=式：YYYY-MM-DD,H=H:MM:SS")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "发布时间")
    private Date time;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("content", getContent())
            .append("imgs", getImgs())
            .append("time", getTime())
            .toString();
    }
}
